package com.park.service.impl;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.park.dao.ParkRecordDataMapper;
import com.park.model.ParkRecordData;
import com.park.model.PosChargeData;
import com.park.service.ParkRecordDataService;

@Service
public class ParkRecordDataServiceImp implements ParkRecordDataService {

	@Autowired
	private ParkRecordDataMapper parkRecordDataMapper;
	@Override
	public List<ParkRecordData> getParkingByParkDatetime(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return parkRecordDataMapper.getParkingByParkDatetime(map);
	}

	@Override
	public int getParkingAllCount(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return parkRecordDataMapper.getParkingAllCount(map);
	}

	@Override
	public List<ParkRecordData> getParkingByParkId(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return parkRecordDataMapper.getParkingByParkId(map);
	}

	@Override
	public int getParkingAllCountById(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return parkRecordDataMapper.getParkingAllCountById(map);
	}

	@Override
	public List<ParkRecordData> getByParkId(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return parkRecordDataMapper.getByParkId(map);
	}

	@Override
	public int getAllCountById(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return parkRecordDataMapper.getAllCount(map);
	}

	@Override
	public int insert(ParkRecordData parkRecordData) {
		return parkRecordDataMapper.insert(parkRecordData);
	}

	@Override
	public ParkRecordData getById(Integer id) {
		// TODO Auto-generated method stub
		return parkRecordDataMapper.getById(id);
	}

	@Override
	public double getPaidMoneyOfDay(List<Long> ids) {
		// TODO Auto-generated method stub
		return parkRecordDataMapper.getPaidMoneyOfDay(ids);
	}

	@Override
	public List<Double> getWeekPaidMoney(List<Long> ids) {
		// TODO Auto-generated method stub
		return parkRecordDataMapper.getWeekPaidMoney(ids);
	}

	@Override
	public List<PosChargeData> getAllParkRecord(List<Long> ids,int parkId, Date entranceStart1, Date entranceEnd1, Date exitStart1,
			Date exitEnd1, String plateNumber, String portNumber,String operatorId) {
		// TODO Auto-generated method stub
		return parkRecordDataMapper.getAllParkRecord(ids,parkId,entranceStart1,entranceEnd1,exitStart1,exitEnd1,plateNumber,portNumber,operatorId);
	}

	@Override
	public double getAllPaidMoney() {
		// TODO Auto-generated method stub
		return parkRecordDataMapper.getAllPaidMoney();
	}

	@Override
	public int insertV2(PosChargeData charge) {
		return parkRecordDataMapper.insertV2(charge);
		
	}

	@Override
	public List<PosChargeData> getLastRecordWithPark(String cardNumber, int i, Integer parkId) {
		// TODO Auto-generated method stub
		return parkRecordDataMapper.getLastRecordWithParkV1(cardNumber, i, parkId);
	}
}
